POST
/
1
/
events
// Initialize the client
var client = new InsightsClient(
  new InsightsConfig("YOUR_APP_ID", "YOUR_API_KEY", "YOUR_APP_ID_REGION")
);

// Call the API
var response = await client.PushEventsAsync(
  new InsightsEvents
  {
    Events = new List<EventsItems>
    {
      new EventsItems(
        new ClickedObjectIDsAfterSearch
        {
          EventType = Enum.Parse<ClickEvent>("Click"),
          EventName = "Product Clicked",
          Index = "products",
          UserToken = "user-123456",
          AuthenticatedUserToken = "user-123456",
          Timestamp = 1641290601962L,
          ObjectIDs = new List<string> { "9780545139700", "9780439784542" },
          QueryID = "43b15df305339e827f0ac0bdc5ebcaa7",
          Positions = new List<int> { 7, 6 },
        }
      )
    },
  }
);
{
"status": 200,
"message": "OK"
}

Authorizations

x-algolia-application-id
string
header
required

Your Algolia application ID.

x-algolia-api-key
string
header
required

Your Algolia API key with the necessary permissions to make the request. Permissions are controlled through access control lists (ACL) and access restrictions. The required ACL to make a request is listed in each endpoint's reference.

Body

application/json

Response

200
application/json

OK

The response of the Insights API.